import request from '@/utils/request'

// 告警列表
export function alarmInfo_list(data) {
    return request({
        url: '/system/alarmInfo/list',
        method: 'get',
        params: data
    })
}
//导出的最大数
export function queryByLoginToken(data) {
    return request({
        url: '/system/alarmInfo/datadict/queryByLoginToken',
        method: 'get',
        params: data
    })
}
// 获取告警类型
export function alarmInfo_alarmType(data) {
    return request({
        url: '/system/alarmInfo/getAlarmType',
        method: 'get',
        params: data
    })
}
// 获取告警类型
export function alarmInfo_getInfo(data) {
    return request({
        url: '/system/alarmInfo/getInfo',
        method: 'get',
        params: data
    })
}
// 获取告警等级
export function alarmInfo_alarmLevel(data) {
    return request({
        url: '/system/alarmInfo/getAlarmLevel',
        method: 'get',
        params: data
    })
}
// 编辑告警状态
export function alarmInfo_updateAlarmStatus(data) {
    return request({
        url: '/system/alarmInfo/updateAlarmStatus',
        method: 'post',
        data: data
    })
}
// 保存工单
export function workOrder_saveWork(data) {
    return request({
        url: '/system/workOrder/saveWork',
        method: 'post',
        data: data
    })
}
//查询工单流程
export function workOrder_WorkProcess(data) {
    return request({
        url: '/system/workOrder/getWorkProcess',
        method: 'get',
        params: data
    })
}
// 获取工单标题
export function workOrder_WorkName(data) {
    return request({
        url: '/system/workOrder/getWorkName',
        method: 'get',
        params: data
    })
}
// 催单
export function workOrder_speedWork(data) {
    return request({
        url: '/system/workOrder/speedWork',
        method: 'post',
        data: data
    })
}
// 人工处理
export function workOrder_workDeal(data) {
    return request({
        url: '/system/workOrder/workDeal',
        method: 'post',
        data: data
    })
}
export function systemnames(data) {
    return request({
        url: '/system/alarmInfo/alarm/systemnames',
        method: 'get',
        params: data
    })
}

export function queryDeptTreeList(data) {
    return request({
        url: '/analysiscenter/source/queryDeptTreeList',
        method: 'get',
        params: data
    })
}
export function queryUserList(data) {
    return request({
        url: '/datascan/b/dbinfo/queryUserList',
        method: 'get',
        params: data
    })
}

export function queryUserByDepId(data) {
    return request({
        url: '/datascan/b/dbinfo/queryUserByDepId',
        method: 'get',
        params: data
    })
}

export function assetsQueryUserByDepId(data) {
    return request({
        url: '/analysiscenter/source/queryUserByDepId',
        method: 'get',
        params: data
    })
}

export function DbqueryUserByDepId(data) {
    return request({
        url: '/datascan/b/dbinfo/queryDeptTreeList',
        method: 'get',
        params: data
    })
}
// 7天日志量
export function alarmLogDataTrend(data) {
    return request({
        url: '/system/alarmInfo/alarmLogDataTrend',
        method: 'post',
        data: data
    })
}

export function updateDeptId(data) {
    return request({
        url: '/system/alarmInfo/updateDeptId',
        method: 'post',
        data
    })
}

// 7天告警量
export function alarmNumDataByTargetIpTrend(data) {
    return request({
        url: '/system/alarmInfo/alarmNumDataByTargetIpTrend',
        method: 'get',
        params: data
    })
}
// 事件类型
export function alarmInfoCountGroupByType(data) {
    return request({
        url: '/system/alarmInfo/alarmInfoCountGroupByType',
        method: 'get',
        params: data
    })
}
// 告警占比
export function alarmInfoCountGroupByRuleName(data) {
    return request({
        url: '/system/alarmInfo/alarmInfoCountGroupByRuleName',
        method: 'get',
        params: data
    })
}

// 告警详情列表
export function alarmInfoList(data) {
    return request({
        url: '/system/alarmInfo/list',
        method: 'get',
        params: data
    })
}
//日志详情
export function logInfoByAlarmTargetIp(data) {
    return request({
        url: '/system/alarmInfo/logInfoByAlarmTargetIp',
        method: 'post',
        data: data
    })
}
//源IP详情
export function getSourceIpInfo(data) {
    return request({
        url: '/system/alarmInfo/getSourceIpInfo',
        method: 'get',
        params: data
    })
}
export function getAssetInfo(data) {
    return request({
        url: '/system/alarmInfo/getAssetInfo',
        method: 'get',
        params: data
    })
}
export function logDetail(data) {
    return request({
        url: '/system/alarmInfo/logDetail',
        method: 'get',
        params: data
    })
}

export function indexExtraInfo(data) {
    return request({
        url: '/system/alarmInfo/indexExtraInfo',
        method: 'get',
        params: data
    })
}

export function indexExtraList(data) {
    return request({
        url: '/system/alarmInfo/indexExtraList',
        method: 'get',
        params: data
    })
}

//误报处理新增
export function missRecordAdd(data) {
    return request({
        url: '/system/falseAlarm/add',
        method: 'post',
        data
    })
}

//误报处理
export function missRecordEdit(data) {
    return request({
        url: '/system/falseAlarm/edit',
        method: 'post',
        data
    })
}